package com.mujin.keji.collectionsystem.module.updata.presenter;

import android.util.Log;

import com.mujin.keji.collectionsystem.module.updata.contract.UploadContract;
import com.mujin.keji.collectionsystem.module.updata.model.IUploadModel;
import com.mujin.keji.collectionsystem.module.updata.model.UploadModel;
import com.orhanobut.logger.Logger;

/**
 * 上传文件Presenter
 *
 * @author weishixiong
 * @Time 2018-04-13
 */
public class UploadPresenter implements UploadContract.Presenter, IUploadModel.UploadFileListener {
    private static final String TAG = "UploadPresenter";
    private UploadContract.View view;
    private IUploadModel uploadModel;

    public UploadPresenter(UploadContract.View view) {
        this.view = view;
        view.setPresenter(this);
        uploadModel = new UploadModel();
    }

    @Override
    public void start() {
        uploadFile();
    }

    @Override
    public void stop() {
        this.view = null;

    }

    @Override
    public void uploadFile() {

    }

    @Override
    public void onUploading(long progess, long counth) {
        //Logger.d(TAG, "onUploading: " + progess + ":" + counth);
    }

    @Override
    public void onUploaSuccess() {
      //  Logger.d(TAG, "onUploaSuccess: ");
    }

    @Override
    public void onUploadFailuer() {
       // Logger.d(TAG, "onUploadFailuer: ");
    }
}
